<!DOCTYPE html>
<html>
    <style id="style">
        @media all {
        }
    </style>
    <script src="../include.js"></script>
    <script>
        test(() => {
            const mediaRule = document.styleSheets[0].cssRules[0];
            mediaRule.insertRule("foobar {}", 0);

            if (mediaRule.cssRules[0].parentStyleSheet === document.styleSheets[0]) {
                println("Pass!");
            } else {
                println("Fail!");
            }
        });
    </script>
</html>
